package Example5;

import java.util.Observable;
import java.util.Observer;

/**
 * 学生订阅者
 */
public class StuObserver implements Observer {

    @Override
    public void update(Observable o, Object arg) {

        System.out.println("学生收到消息: ");
        System.out.println(o+" , "+(String) arg);
    }

}
